
const mongoose = require('mongoose');
const dbConfig = require('../config/config')
const {dbHost,dbPort,dbName} = dbConfig

module.exports =  function  () {
  mongoose.connect(`mongodb://${dbHost}:${dbPort}/${dbName}`)
    .then(() => {
      console.log('链接成功')
    })
    .catch((error) => {
      console.log(11)
    })
}




